<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="amqp.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="amqp.examples.html">范例</a></div>
 <div class="up"><a href="book.amqp.html">AMQP</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="amqp.constants" class="appendix">
  <h1>预定义常量</h1>

  <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
  <p class="para">
    <dl>

      
        <dt id="constant.amqp-noparam">
          <strong><code>AMQP_NOPARAM</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Passing in this constant as a flag will forcefully disable all other flags. Use this if you want to temporarily disable the <em>amqp.auto_ack</em> ini setting.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-durable">
          <strong><code>AMQP_DURABLE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Durable exchanges and queues will survive a broker restart, complete with all of their data.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-passive">
          <strong><code>AMQP_PASSIVE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Passive exchanges are queues will not be redeclared, but the broker will throw an error if the exchange or queue does not exist.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-exclusive">
          <strong><code>AMQP_EXCLUSIVE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Valid for queues only, this flag indicates that only one client can be listening to and consuming from this queue.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-autodelete">
          <strong><code>AMQP_AUTODELETE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            For exchanges, the auto delete flag indicates that the exchange will be deleted as soon as no more queues are bound to it.
            If no queues were ever bound the exchange, the exchange will never be deleted.
          </span>
          <span class="simpara">
            For queues, the auto delete flag indicates that the queue will be deleted as soon as there are no more listeners subscribed to it.
            If no subscription has ever been active, the queue will never be deleted.
          </span>
          <span class="simpara">
            Note: Exclusive queues will always be automatically deleted with the client disconnects.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-internal">
          <strong><code>AMQP_INTERNAL</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Clients are not allowed to make specific queue bindings to exchanges defined with this flag.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-nolocal">
          <strong><code>AMQP_NOLOCAL</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            When passed to the consume method for a clustered environment, do not consume from the local node.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-autoack">
          <strong><code>AMQP_AUTOACK</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            When passed to the <span class="methodname"><a href="amqpqueue.get.html" class="methodname">AMQPQueue::get()</a></span> and
            <span class="methodname"><a href="amqpqueue.consume.html" class="methodname">AMQPQueue::consume()</a></span> methods as a flag, the
            messages will be immediately marked as acknowledged by the server
            upon delivery.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-ifempty">
          <strong><code>AMQP_IFEMPTY</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Passed on queue creation, this flag indicates that the queue should be deleted if it becomes empty.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-ifunused">
          <strong><code>AMQP_IFUNUSED</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            Passed on queue or exchange creation, this flag indicates that the queue or exchange should be deleted when no clients are connected
            to the given queue or exchange.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-mandatory">
          <strong><code>AMQP_MANDATORY</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            When publishing a message, the message must be routed to a valid queue. If it is not, an error will be returned.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-immediate">
          <strong><code>AMQP_IMMEDIATE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            When publishing a message, mark this message for immediate processing by the broker. (High priority message.)
          </span>
        </dd>

      
      
        <dt id="constant.amqp-multiple">
          <strong><code>AMQP_MULTIPLE</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            If set during a call to <span class="methodname"><a href="amqpqueue.ack.html" class="methodname">AMQPQueue::ack()</a></span>, the delivery tag is treated as &quot;up to and including&quot;, so that multiple messages can be acknowledged with a single method. If set to zero, the delivery tag refers to a single message. If the <strong><code>AMQP_MULTIPLE</code></strong> flag is set, and the delivery tag is zero, this indicates acknowledgement of all outstanding messages. 
          </span>
        </dd>

      
      
        <dt id="constant.amqp-nowait">
          <strong><code>AMQP_NOWAIT</code></strong>
          (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            If set during a call to <span class="methodname"><a href="amqpexchange.bind.html" class="methodname">AMQPExchange::bind()</a></span>, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. 
          </span>
        </dd>

            
        <dt id="constant.amqp-ex-type-direct">
          <strong><code>AMQP_EX_TYPE_DIRECT</code></strong>
          (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            A direct exchange type.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-ex-type-fanout">
          <strong><code>AMQP_EX_TYPE_FANOUT</code></strong>
          (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            A fanout exchange type.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-ex-type-topic">
          <strong><code>AMQP_EX_TYPE_TOPIC</code></strong>
          (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            A topic exchange type.
          </span>
        </dd>

      
      
        <dt id="constant.amqp-ex-type-header">
          <strong><code>AMQP_EX_TYPE_HEADER</code></strong>
          (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
        </dt>

        <dd>

          <span class="simpara">
            A header exchange type.
          </span>
        </dd>

      
    </dl>

  </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="amqp.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="amqp.examples.html">范例</a></div>
 <div class="up"><a href="book.amqp.html">AMQP</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
